﻿using System;
using System.Web.UI;
using Portal.Data.Config;
using Portal.Data.Entity;
using Portal.Data.Webparts;

public partial class Webparts_Templates_truyen_ListHot : WebpartControl
{
    public override WebpartConfig NewConfig
    {
        get { return new GetMaxConfig(); }
    }

    public GetMaxConfig PartConfig
    {
        get { return (GetMaxConfig)Config; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int pageindex = Common.GetCurrentPageIndex();
            var books = Book.FindHots(pageindex);
            Items.DataSource = books;
            Items.DataBind();

            Common.PagingWithouTotalCount(new Control[] { phPagingBottom }, pageindex, books.Count);
        }
    }
}